package beans;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;

import model.Itens;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import control.Dados;

public class FinalizarPedidoForm extends ActionForm{

	private ArrayList<Itens> itens = new ArrayList<Itens>();
	private int codigo;
	
	public void reset (ActionMapping mapping, HttpServletRequest request){
		if(!itens.isEmpty())
			this.itens.clear();
		this.codigo = 0;		
	}

	public ArrayList<Itens> getItens() {
		return itens;
	}

	public void setItens() {
		this.itens = (ArrayList<Itens>) Dados.carrinho.clone();
	}

	public int getCodigo() {
		return codigo;
	}

	public void setCodigo() {
		this.codigo = Dados.codigo;
	}
	
}
